Stress pattern is not fixed in English language. It is not fixed in any other language on the Earth. There are two reasons for stress position to vary and we are going to take a look at both of them.
This is an aspect of connected speech but the effect is visible; the stress on a final-stressed compound moves to the preceding syllable if the following word begins with a strong-stressed syllable.
Heavy-handed /ˌhɛv iˈhæn dɪd/ – The primary stress is on handed
A heavy-handed sentence /ˈhɛvi hæn dɪd ˈsɛn tns/ – The primary stress moves on heavy
This is not a very big problem but it is absolutely essential for all learners of English to be aware of before judging someone’s way of speaking.
Bed-tempered /ˈbædˌtɛm pərd/ or /ˌbædˈtemp.əd/
Kilometer /kɪˈlɒm ɪ tər/ or /ˈkɪl.əˌmiː.tər/
It would be quite wrong to say that one version is wrong and another one is correct. In some places of the world people use one version and in other places people use another version.