fix error on js