fixed undefined error occuring on the initial delete of new items
merged sandi's changes