fixes related to https://themes.trac.wordpress.org/ticket/20593
upgrade patch
Merge branch 'release/2.4.1'