Imports from upstream 6.1.0 and 6.0-update