fixed scala warnings

This resolves issue #688