Fixed templates inheritance