Trying to get rid of the bugs created by varying message size lengths