fixes bug with storing updated time