Fix a bug in table decoding