exception handling attempt; index bug fix