fix proxy support in 1.3.1

needs review and some more real testing.