Formatting detection fix