Fixed a bug... Maybe fixed segfault?