Fixed python 3 support in gui.