fixed an issue in errors