Adapted to external ulib