Fix crash when callibrate