Change logic to fix failing tests.