fixed the unique constraint