fixed bug in gyro code