Ensure orderByPriority always returns an array, fixes #172