fixed some bugs with classpath