Fixing errors of Ipython output