Inertia Sensor Not Calibrating

When I’m not running my code and just calibrating my inertia sensor then it’s correct. But when I’m running a program, it says “calibrating inertia”, but the calibration is incorrect. I have the newest version, so what should I do? Thanks.