Fixed minor crashing bug