keep double buffer display/write in sync even on page reload