Fix calendar query parser