BUG: using the template type for velocity values