Merge from Brad upstream