Fix bug in add.