Fixed bugs with compass.