Fix compile errors