L4lb patches for master

This series of patches is identical to #90 and #97 but for `master`.