fix dismiss modal on upload