Fixing time bug