Fixed bug that was raising and clearing errors too quickly.