Index bounds issue fixed.