Minor bugs on formulae