correct write error