Adapted to ArnLib 2.1