Fixed bug if  is last character in format string.