fixed error output code