modified to keep lowercase/uppercase of a table name in tspawn command.