Removed debug info from test.
Fixed buffer leakage bug.