Fixed compatibility problem with 1.7.x