fix classpath and reflection issues