Fixed failing tests due to refactor