Your dog has no idea of what is ok and what is not, it appears that the previous owner has made a lasting impression on the dog.
Your dog instinctively knows that dinner time is off limits and out she runs!
Use the old method of good behavoir receives a reward, be it a scooby snack or milkbone. Friendship and love cures all wounds and the hurt a dog feels to be a stray. Praise is another good incentive for your dog to be good.
After some time has passed you'll find that your dog has over came the problems that bug you as well.
Don't give up you can do it!
Without you, the dog is unwanted once more..