Fixed a segfault caused by freeing integers (it's past midnight here...). Also added a line for debugging.