Synchronize state of task with checkbox's state