When dogs think they are in trouble