Fxied bug
Fixed memory leak in unit tests