Made sure that output would be correctly shown at the end