Fix Python interface