xajax: some fixes ported from xajax git (part 2)