Returning code from worldpay is inconsistent.

On one line you see:

<div id="navMainWrapper"> <div id="navMain">

and a few lines down you see

<div id="navMainSearch" />

But the closing </div> is there in more places then not.