Fixed small memory issue