Fixing document mapping.