Fixes a critical comparison error