Undefinied index of newly added drag and drop item bug fix