fix replay bug