Fixed memory leak

Still have bug wit movement