trying to fix unknown issue causing out-of-index exception