Fixing issue with date