Fixed a bug with time not being updated