Fixes #255 - orderByPriority always returns an array

orderByPriority always returns an array
simplified return logic