bug: datetime queries fixed