fix nc4 writing