Fixed JS error. when setting default parameter.