Extra checks and error handling