Fixed an error in format method where first token was not being replaced.