Fix NaN bug for record with empty coordinates