ugly fix to stupid use of indexing