Cropping

fix js scope bug
looks like some changes on the upgrade steps did not make it into my last pull request.