script for fixing substance id's