Fixed mismatched brackets in calibrate()