Changed reading logic. Fixed a rare crash when calling getTime function.