bugfixes for dbutils and implemented unit tests