Fix flickering in gallery mode.