Rip-off of FD, makes our dirvecs match
Fix allocator side problems