remove dependency on Scala
fix crash bug