fixed Bot database handling