Reset offset when switch branches