Don't get your dog home and expect everything to be perfect, let them settle in and take things slowly while they get used to their new home and family.
It is a common human trait to except everything straight away, but dogs just don't work like that. Sure if you get a rescue they a often house trained, but remember that stress or time in kennels can also have an effect of this so you may still get a couple of accidents.
Start off getting to know your dog, rather than diving in trying to fix everything straight away. Sure certain things need to be done straight away like deciding where your dog will sleep and not letting them steal food. But the other stuff can wait a bit and be built up gradually.