another bunch of fixes, mostly for kernel allocator