Fix compile errors in ubuntu