fix pesky resource leak that took me two f*#+ing days to figure out. No thanks to you, valgrind