important fixes in data output