fixing document type