Merge pull request #206 from jcmurray/master

Fixed error in AID registration code