re-apply changes from the 0.7.x branch
4 files changed