Removed deprecated code marked in 5.0.x : replaced deprecated method usage