fixed a bug with reverting a revision