bug fix in save