db logging fix