Fix #2069
Fix #2096
Test case for #2096
Take care of #2144
Fix some build errors for Windows
Merge pull request #2141 from sjinks/1.3.0

Fix #2069