Fixed some weird crash bug, need to report this.
Moved baseType & pointerType tests to unit test.