fixed the convert and the sel-to-str functions