fixing update function to strip out the now incorrect index entries