Fixed typo in displaypub

Regression introduced in #4229
Merge pull request #4718 from jdfreder/clear_output_fix_2

Fixed typo in displaypub