Fix some compilation errors