corrected id comparison error