I have no clue how these bugs happened. I have no clue what was the issue exacly. All I know is that I have multiplied wrong indeces with wrong dimensions. Guess even this is maths sometimes.