bugfixes for dbhandler