fixing preview according to logic chances on js