Fixes bug when there is no current agent on agents#index controller.