Bug fix for R magic, and clearing out the notebook cells