committted bug 720180 and bug 834721. rebased bug 833877