prevent exception when tool is null (happens on page reload)