FIX: clicking a button that disappears in a modal would close the modal (take 2)