Fixed crashing feature due to date time comparison