Some error handling.