Added duplicate assignment check