Fixed NullPointerException from set-error-mode!