* fix memleaks in preferences