minor error handling checks