fix sort method to use numeric sort