fix saving during database update
fix some whitespaces