Fixed bad sampling issues when dealing with large sample distances