encoding and table attributes fixes