fixing NPE related to revisions