fix error handling for rotten