slightly adjusted previous fix to be little less explosive. Also fix unit tests and disable logging in unit test target.