Fixes for unified format and the scanner