fixed setPreference(). closes #1