Fixed the numeric sorting issue

Also fixed the sorting of columns other than first