Better logic, and unfortunately now with custom fact.