fixed up the behavior of dump()
various cairo improvements