fixed bug in config save function