Some SQL fixes to task history.
Some SQL fixes to task history.

chadmv/plow,chadmv/plow,chadmv/plow,chadmv/plow,chadmv/plow,Br3nda/plow,Br3nda/plow,chadmv/plow,chadmv/plow,Br3nda/plow,Br3nda/plow,Br3nda/plow