Fixed ORA-767, along with a number of small issues the tests brought up
Merge pull request #581 from edx/grady/ORA-767

Fixes ORA 767