Bugfix for running in IDLE3.