Fix replay bug