Also including changes from master's 77eb550a99c2b786c3fcf7498dd2b5f792efe2be
Also including changes from master's c719000ad4edf44a7c805e6692543772dbd62a8e