Fix issue that made task output lost