update background to black to prevent flashing