Changed Task constructor to Task.delay, as suggested by @tpolecat