Fixing destroy event