To make a compass work I found that I needed to put it on a nonmagnetic mount that was sticking out very far away from handlebars. Even then the readings could not be fully trusted. One way out is to use a compass on a wristwatch strap, particularly on the side of the watch and take the hand off the handlebars for a reading.