Adding fix for modernist theme, hooks to fix other themes.