Fixed severe crashing bug.