Fixed memory eating bug