Fix fwrite()