fix string helper functions