Fledgling/young bluetit 'stuck' in bird box opening

I have a bird box on the side of my house that has bluetits nesting. We found a young bird seemingly stuck half in and half out the hole. The parents were still flying in and out squeezing past the baby. I wasn't sure what to do, but managed to gently push it back in (think a claw had got stuck). I'm not sure if this was the right thing to do? It's wing feathers still didn't seem to have fully opened and I was worried it wouldn't be able to fly (lots of cats) if it needed to.