fix db profling on pages that put javascript after </html>, like edit/part_event...