fixed bug when toggling done attribute