Created by: szarsti
Somehow this makes it work ok, while previous implementation caused data missalignment