only pass variables if the array isn't 0 length.

Signed-off-by: Matthew Baird <mattbaird@gmail.com>