trying to fix replay bug