fix end of transmission