Fixed crashing issue when "quit" was typed