Fixed a bug with the global sprintf.