Fixed #627
Fixed #628
Fixing #641
Fixing #642
Merge branch 'master' into apiv2
Fixed #628 (now complete fix)
Added logging to better debug #630
Fixed #643