fix(modal): backport to 0.6 fix for #969