Fix dealloc method