fix integrity constraint violation