bug fix in ResultDatabase