Fixed db connect.