[fix] Distance counting