sort magic by priority again