Added one error check.