Minor error handling change