Preserving doc attrs