fixes for some small bugs in ipython notebook