fixing bug in which revComp was not applied, and others