fix HardwareDisplay rendering bug