Cleaned up a little bit of memory corruption