only rewrite state while value is not set