minor error handling