Fix the compilation errors & warnings due to rebasing