fixes Memory management 2