Fixes dealloc issue