Add weight field to prefixes.