Fix modalDismissed not getting fired