fixed random crashy bug