js mistake fixed