Fix for not properly closed modal