correct issue with default string value

default value is used if the string is not set in javascript.