Changed rupgrade to work on master branch