add(): fix bug introduced in last commit