fixups for python-mode

It seems we trigger early if not careful.