Date cmp bugfix