Fixed the problem with segfaults - actually a bug/limitation in