How do you fix a bad latch?

Abby
How do you fix a bad latch? My little one is three and a half weeks old and while it seemed like he was starting to get a better and deeper latch towards the end of last week, I realized that my nipples still don't seem to be getting less sore and he is starting to latch shallow again. I've read everything online about how to make a baby open wide and latch correctly, but I still can't seem to get him to do it. Even when I can get him to open wide, I still feel like he isn't latching deep enough causing a lot of pain still. He still is obviously getting plenty enough milk though because at his last appointment he was ten and a half pounds and in the 90th percentile for his age. So I know he's getting milk! Just didn't think it was normal for it to still hurt so bad the whole feeding at almost a month old. Any advice or tips appreciated! Thanks!