added safety to HistMerger