Fixed comparison in LCP generation