Track when the modal comes up. Fix #366