fixed issue with datetime