Fixed bug with duplicate users