Fixing compile errors on 1.x branch