Master cherry pick

Cherry pick old changes from trunk that were never merged to release in subversion.