fixed unitTest and minor privacynoid leaks