Fixed msg array size

Was writing past the end of the array.