Fix a preference loading bug in the preferences dialog.

This was accidentally introduced in the last commit.