How to round out the end of a beam particle?

I did rounded beam end in material. base is rectangle and then from corners subtract something rounded. works fine however stretching is sometimes problem.