Properly use format passed as argument.

Thanks to Stefan Karpinski (http://goo.gl/sgg9lJ)