Fix compilation errors in translated scala files