Date formatting bugfix