fix bug in idempotent test