fixed python mode stuff