Ref #10. Attempt to fix.
Definitely fixed some, need to test on the live site to see if it fixes descrepancies.