fix error on documents#index view