Revert "added fix to segfault"

This reverts commit f62cffc6ae16e337a900df9147f9f42f8932bbcf.