fix sorting by related object name