bug fix: use strlen to find string size