fix syntax in js