Slight change on table generation code