fix validation and popups