Fixed broken template inheritance