Fixes #130.

Normally revpos will be a long, but in some cases,
it will be an int. This fix handles both cases.