Fix compilation for scala.