Fix bug with predefined date queries not working