Fixed a bug in molecule list processing