Fixed issues with exporting datetime objects