Merges upstream/master

This simply gets the dev/master merges clean again; a previous scheduler fix in PR #331 was not brought back to the dev branch as well.