Corrected erroneous sprintf() (closes #3296)