Fixing document form on edit