Merge pull request #260 from christav/dev

Table encoding fixes