bug in table generation