fix python mode settings