fixed double destroy bug with alerts