Fixed compatibility with R3.0.0