delete attributes before setting them on save