fix bugs in shifting revisions