Merged from 1.8 stable