task engine - new connection error fix, additional comma in sql, fixes #211