Fixed an issue where the last time value gets overwritten