fix to net_wait_for_response function