Fixed warning when there are no documents