fixed a bug in the user check