Added fixing of id on save