Add missing 'when' to attribute file