Fixed registration compile issue.

Previous "solution" was not working as intended. Reverted to old method.