moving asserts to THAssert, not sure why assert.h asserts are not getting triggered properly