attempt to fix macosx compile
make chat message safer against overflow