fixed error with preview and there being no date in data