fixed bug in add