Fixed problems with the last commit. Multiplicity test added and few checks