fix the bug during updating tasks