Fixed dealloc bug