Fixed a minor issue using sprintf to print an integer