Some debugging needed for redrawing