Use instance sort method instead of Array.sort, fixes Issue#1