Fix dropping indexes and refs