Fix tests due to refactor