Fix all compilation errors