How can the "end effect " be reduced on a long Bar magnet where the (for example) North pole is along the length of the top side. For example a 0.5 cm square bar say 5" long is stuck (South) onto a metal backing. The center length of 4" has a linear field effect but the ends have a bloom presumably as the N/S pole fields overlap. For example a small washer can be placed anywhere along the middle (top side) and will stay where placed, but when slid to the end, and released, it jumps back a cm away from the end? Basically, this non-linear field is stronger attracting at these ends. It is desired to reduce this end effect.