Fix apply in preferences dialog.