proper merging for #12008 and #12138