Fix compile errors from incremental patchs