Bugfixes

Fix small but fatal bugs involving parameter passing for task call and dbManager call.
the Insert function needs a flag for this that defaults to nil