Fixed one appending that was 1+1 instead of i+1