changed crash prevention a little