fixes issue where a php notice was emitted if a given template does not exist