some new changes

Pulled patch from upstream, making everything able to be auto merged again ^_^