fix bug in registration controller