Fixed minor bug that caused big crash