fixes bug in "Add" feature