Fix issue with incorrect table attributes

Fix problem in which invalid table attributes were being parsed
incorrectly. Added tests.