[fix] Resource leaks