fix the modal cache problem