fixed bug that crashed binning when distances were NA