Fixed some bugs. Still an issue with transmission sometimes not completi...

...ng