fix db bug try 2