Ported repair to pydriver