fixed bug with setDate