Fix Segfaults

Credit @SimonSickle