fix(modal): applied @AGiorgetti's fix for #969