Fixing example chat.c app