Fixed wait_response handling so to deal with proper number of