Fix compile errors

Fixes several compilation errors with 2.066.1.