Fixed a crash on dealloc instance