Update ripple-lib and fix resulting bugs