fix crash when there are no docs