fixes #413 - passes $format to sprintf()