

I understand how this is happening. There's a default line that goes 'I sell them for ... gold each. How many ...s do you want?'
Most of the time this gives a satisfying result. But sometimes things fit badly.
I'm trying to think about a solution here, and I wonder if it's better if you change the line to 'One ... costs ... gold. How many would you like?' The examples above would certainly benefit from it, not only sort spelling but also sort the window overflow problem in the second example.
Alternatively, if it's only happening with books (I haven't played yet enough to know), maybe you can put in some code to prevent books from popping up in quanties bigger than 1. You probably wouldn't want more than 1 copy of the same book anyway.