fixed save bugs