Baby getting stuck in crib slats?

We have just begun transitioning my 5mo baby into his crib for naps and tonight was his first night sleeping in it all night. I heard him crying on the baby monitor, went to check and his arm was stuck in the crib slat hanging out. I got his arm out and set him on his back in the middle of his crib but I’m worried because this has happened a few times. He’s woken up because his arm or leg is hanging through the slats!

How can I prevent this from happening? (FTM) 😰😰