Fix for replay bugs from issue #55