fixed errors in registers controller