Fixed type casting in revert function

Type casted version to integer for searching out a revision to revert
back to