correct some minor python errors