Trying to resolve unique constraint error