fixed duplicate entries in database