Fixing bug so that date update is correct