bug fixes in db table generator.