fixes various compilation errors due to code merging