Fix ranking for elements