Patch gotogal to avoid weird oscillation around pi, -pi