prevent possible server crash by client sending garbage.