fixing recentTasks function