workaround for cp32331

This is a questionable workaround. It helps in case of ipython notepad but very likely has other side effects.