Minor fixes to Scala