Fix dismissing modals with remapped parameters

Closes #128