fix tomcat installation detection bug