Fix conversion to Task