It's most likely an accuracy issue then. Due to the limitations of the floating point format, neither the distance nor the scaling will be 100% correct and depending on the distance, this inaccuracies might become noticable. I don't see how to fix this...