fixed a bug in nextuser