Fix revision bug in contrib generation

Try to fix bug with revision limits. Tested locally.

/cc @REAS @alignedleft @prisonerjohn