fixed issue with db connect