Fixed a random crash

Yes, I fixed a random crash