Fixed bug in date tests