fixed error. It was reading non existing memory, but from some reason did not matter
Merge remote-tracking branch 'kus/master'
rolled back assert in loops