minor error catching