fixed a bug with wrong day