Add missing id check