Possibly fixed error with overwriting another process in memory because tempSize counter was not resetted if there is not enough contiguous memory.