Membership Pro 2 Invitation codes not displaying

Hi there. I'm trying to setup a membership site that requires an invitation code when registering for a membership. I'm using the Spirit theme with Coursepress and Membership pro 2 to handle the membership side of things.

I've got the registration form set up and that works and it then moves to the page where you select a membership but at that point it should ask for the invitation code.

Unfortunately it just goes back to the user registration page.

Any help is gratefully appreciated.