Fixed an issue with empty where statements