Fix for bug where wrong modal would dispay