Fixed issue when rendering a template more than once
Allow for 0 and '0' to be used in URL without them getting removed.
Correct behavior when generating queries with NULL in them.
Return correct record count.