fix bug in StringCheck