Debug getting tasks from database