fix duplicate users issue