Return back bug 944521 changes, and fix problem locally