memory guard fixes
fixing array grow/resize funcitons