fixed a bug with missing date