landed patches from bug 861495