rebase of bugfixes from the miniAOD-from710pre5 pull request