Fixing destroy button bug