fixed python errors