fix #119: add cells after output, not input