fix write_flash size of len for 64bit