Fixing sorting method and tostring metamod