fixed buffer shift functions
server sending works again