fixes overflow issue on messages