Fix bugs in output of notebooks