Fixed crashing bug.