Fix js for default values with defined value