Fixed errors in setting user preferences