Proposed fix for #51 and #57

I believe this should fix the problems seen on ripplecharts.com,xrpvalue.com,ripple.com/client