Fixes of uplink switching code.