[toodoo] fix the logic problems