fixed scala warnings