vjr fix memory leaks, complete