Backported issues found by stabilizer to 3.3 release branch