Fix initialization and add test coverage.