fixed a time bug