fixed string matching bug