fixes for response handling