Fix python interface