Registration bug fix