fixed a Date bug