fixed python compile errors