Fixing 2.2 compilation issues