Fixed issues with compass