Fixing issue caused by JSON date handling