fixing problem with multiple redraws