fixing negative mesaage size bug