Fixed the scala sample code.