Fix alert box still showing up if opening new modal