Fixing dispatch template compile error.

I noticed that things didn't quite compile with the templates.