BUGS 10906 and 10902 merged from master