Compilation of various fixes in the issues threads

I don't claim credit for this, it's all fixes from other people I trialed in a batch file until it was "working" for me.