Fixed bug with port casting to string and then breaking %d sprintf