Fixed memory.rb:write size