Fix template detection when not present