fixed js error on registration form