Fix counters and Hub.switch method