restored 5.0.x support on master branch