Issue with <ul> or <ol> followed by <p> and then heading

I have been using Stanza for iPhone and I recently decided to use Calibre for converting HTML files to ePub. I noticed that when I have something like:

[ul]
[li]something here[/li]
[/ul]
[p]some paragraph[/p]
[h3]SUBTITLE GOES HERE[/h3]

the margin between [p] and [h3] is removed for no aparent reason (in the Stanza App for iPhone only),
see here:
http://screencast.com/t/O5G1hj4u4BGC
the source code for this is:
http://screencast.com/t/CMW7XzT5

this, however, does not happen when I have two [p] blocks followed by a heading, either [h3] or [h4] (or whatever heading you use). It only appears to happen when elements are in this order: [ul] or [ol], [p], [heading]

My guess it's an issue with the Stanza app because I can see the ePub file corretly in the Calibre ePub reader, I even tried importing the ePub file to my iPhone (using the ePub created with Calibre) with Stanza Desktop for Windows and get the exact same results.

Using Stanza 1.9.1
on iPhone 3GS OS 3.1.2