fix minor bug in registration.js