Fixed tests and implementations.