index controller bugfix