updateRelationPriority code correction