fix small bugs in duplicate username checking