Fixed a crashy bug