Fix calibrate function (no idea why it works now)