Some error handling changes.