Fix hit detection bug

3b45812 fixes a hit detection bug found by @tsauerwein , where the replays are not replayed in the correct order. The other two commits clean up the canvas replay code a bit.