Fixed possible time bug