finished up the patches for bugs 793996 and 877262 - rebase and cleanup for the former, rebase for the latter.