fixed bug with double adding