Fixes bug in rev