Minor fixes for implementation.