fixed the modal bug