fixed merging for multiple substances