Fix bugs of records and rankings