Fix replay so that it won't include empty commands, which leads to a bug
in the replayer