fix order of static parameter and compilation of kinematic for templates