fix 40 bits date overflow
couple minor tweaks
fix decayed 40 bits int