ensure error handling #9