Command error, chest key opens every chest instead of just the ones with only that key id

I have a lot of chests in my adventure map all with different key id's, at one point you receive a key to open Uncle Rancy's chest. However that key then opens every single chest, which your not supposed to do. Despite having different block Id's. I don't know how to fix it
Continue to help post