Fix for #376 - modal scope error on remove