fix warnings by scalac