Segfaulting

Fixes Issue 365