fixed bug with mismatched id