fix time comparisom