handle crashes better