account for various mysql quirks