fixed the modal problem