fix bug in tasks