fix(modal): destroy modal scope when necessary