Minor fix in Scala API.