Fixed a bug in non memory mapped distance reading
Merge remote-tracking branch 'origin/master'