fixed reference time bug