another bugfix for array indexing (task 4)