Fixed some minor bugs after smoke testing the recent backports.