fixed writev optimization