Fixed bug with revision detection