template fix to prevent exception when label is null