Resolve a crash on dealloc