Value stored but reset doesn't work