Fixed bug with the assignment of the molecule IDs.