bug fix (wrong indices)