Make sure to close the modal whenever we change path [fixes #4]