Fix crash when DB logger is enabled