fix heap allocation crahses, still need to fix registers