Couple of bugfixes
Tests now run without erroring out