fix table generator script