Fixes to error handling and rating