Fixed python integration