The discount is for defensive buildings (walls, towers,...) and haven guard (scullies, redcoats, gunners), not for improvements:
The reason you see "25%" flag on "Improvements" is because of Redcoats and Gunners (which you then don't see because you're at max with them).
The prices of improvements are shown correctly (i.e., they don't show a discount):
For comparison, these are the prices of fortifications:
The items are marked with "-25%", the original prices are crossed over, and the discounted prices are displayed.
So, no bug.
However, I do recognise that the "25%" on the "Improvements" tab is misleading. You can try to make a claim here and ask them to remove the item that you bought and restore the spent rubies.