Neutralisation of dibasic and tribasic acids