Fixed the modal event triggered multiple times

Fixed the modal event triggered multiple times