fixes #7054 target sort