avoiding a crash