Bug fixes for different formats.