Fix implementation for unit tests