Try to fix stat update by forbidding 0xFF values, because 0xFF means 0 and forces the stat size to 1 byte instead of 4.