When running either of those commands with the --tables flag, the tables get passed into the function as a list of strings (as per the function signature), but the code was previously written with the tables being passed as a comma separated list.
Please update those functions to support the list of strings when --tables is specified at the command-line.