Adapted for lb 3.x and theodoric