fixed preferences dialog NPE