Sort states when converted to string