some events were triggered wrong in modal