Improved display logic.

Might not work now, though.