Fix issue #9 by using nprintf() rather than sprintf()