bugfix for date for saving