Fixes #512 and adds buy order totals