Fix bug: get task sql error