Fixed IPython on mode change