fixed nil deallocation