some fixes for output
merge