Fixed #38: Fix position numbering in the case of ties