Merged from to_upstream branch