Fix sorting bug

Sorting by amount was not working properly in Firefox. Fixed in this PR.