Fix Scala compile issue