fixed formatting, and use int to store NBT length, for #1477