Merged from D7 branch