Fixed some pointers errors and added an assert for surface tests for that.