Modified a bug in criteria.openTimes in where clauses