bug fix on register invalid user