Fixed bug from exception thrown in ipython code.