fixes bug that char were sent in wrong direction