Fixed memory leak in generalsettings