Fixed template instantiation/visibility in controllib.