Template bug removal