I should be using %d instead of %i