fixed bug in Add