fixed issue with ids not sorting properly due to type casting