Fixed scala compiler warnings