fix string undefined issue