fixed fee calculation, added error highlighting for json