Fixes Bug 2031 and Partially Fixes 2094