Bugfix, massive bug, awaiting assistance from stackoverflow

Must commit to sync with truxton.