Fix database tasks
Not to load DatabaseTasks implicitly
Fix returning wrong result when empty results returned