How to write a smooth crouching script in blueprint?

Hi, I tried this and it works how I wanted it to, except when I stand up while under something the character just stands and clips through the scenery, getting stuck. Have I missed something, or would this need additional checks to avoid?