fix display logic