Fix for reading chars from proxy connection and connecting over SSL closes #687