template inheritance fixed