Fix serious bug in sprintf