Fixed replace state