Added array_filter to remove empty items that may get returned from output parsing.  Invalid tag issue