Fixed another crash bug

Thanks to Raveo