Merge from upstream master

I needed some fixes from master to continue building your branch