fix the modal popup and the ajax call