When you first read the compass, it gave you the accurate direction. When you held the compass near the buckle, the compass needle was attracted to the metal and gave an incorrect reading. Some rocks are magnetized, and even electrical power lines can influence a compass.