Fixed a serious bug with the outputdict