fixing heap bugs, lots of debugging code
fix heap bug
merge