Use buffering to fix ugly flickering.