1904 modal generator autocomplete fix

Fixes #1904