Task API fixes