Restore previous version (26b1d068ece856ca63fd9ee7f28eaaaa7b0a60ff)

To fix null pointers when accessing the client for indexing