Fixed rm bug, buffer allocation for x64