Bufix/fix db issue