fixed display logic bug