python: fixed errors after merge