fixes 2038 problem (see #805)