Fixed unit tests with warnings on.