fixed a mongodb error preventing users from registering