Replace state instead of pushing state