fix for hardcoded dom object to close modal popup.