Fix scala compile issue