fixes pipe error and displays bar chart