Fixed bug with template parameters in a data query.