Since I am already changing code, If this problem can be solved through code please let me know.
It sounds like you're using a forked copy of mojoPortal which is not supported. We have no idea what you've changed and if it affects captcha. There are supported ways to customize the fields on the Registration page. If you need to go beyond that, you can implement your own registration page without overwriting the built-in page (See thread).
My suggestion is for you to upgrade to the latest version of mojoPortal and see if the problem persists. 22.214.171.124 was released in March 2013 which makes it very old in mojoPortal terms. We've had 7 releases since then and I know some of the captcha code has been rewritten since then.