templated dispatch error