Bug fix for format library