fixed encoding failing at messages above 2^16 len

who even uses that kind of length. either way it's fixed and I removed
excessive printing