Fixed bug when editing event preferences.