fix error handling on save