Backported remaining part of rev 13423 and 13424 to QA_3_3