fixed issue with redundant ampersands in output