Fixes to response handler