bugfixes

This should be pulled ASAP.  It fixes an include problem for some installations and potentially fixes Amagimetal's issue with unpaid orders showing paid.