fixed file sending queueing and other bugs