fix(modal): better option handling (fixes #122, fixes #123, fixes #134)