fixed issue with deletes and null index values + test