Fix Modal re-opening issue

Fixes #189