Fix typo in add function