fix error with id cast on save