Fixed removeAllMolecules array bug