fix build.scala bugs