fixing a time bug