Fixed segfaulting
Fixed segfaulting