Fix Issue #273: Set preferences panel to close when submitted.

fixes #273