FIX: Fix nasty OSX segfaults