identified bug at free() call