modal window now closes when commanded to