fixing date problem